<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 1. 交换2个变量的值
      var a = 20;
      var b = 10;
      var nth = a;
      a = b;
      b = nth;
      console.log(a, b);
    </script>
  </body>
</html>
